package day03_oop_code.com.itheima.d4_innerclass4;

public class Test2 {
    public static void main(String[] args) {
        Swimming s1 = new Swimming() {
            public void swim() {
                System.out.println("学生.swim");
            }
        };


       go(new Swimming() {
           @Override
           public void swim() {
               System.out.println("teacher.swim");
           }
       });
    }
    public static void go(Swimming s){
        System.out.println("start");
        s.swim();
        System.out.println("end");
    }
}
interface Swimming{
    void swim();
}
